package com.itheima.trade.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.model.common.dtos.AccountDto;
import com.itheima.model.common.dtos.ResponseResult;
import com.itheima.model.common.pojos.Account;

public interface AccountService extends IService<Account> {

    /**
     * 转账
     * @param fromAccount
     * @param toAccount
     * @return
     */
    ResponseResult transfer(AccountDto fromAccount, AccountDto toAccount);

    /**
     * 存钱
     * @param accountDto
     * @return
     */
    ResponseResult saving(AccountDto accountDto);

    /**
     * 取钱
     * @param accountDto
     * @return
     */
    ResponseResult withdrawMoney(AccountDto accountDto);
}
